<!DOCTYPE html>
<html lang="en">
  <head>
    <title>CorneredSortFunction Struct Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Struct/CorneredSortFunction" class="dashAnchor"></a>
    <a title="CorneredSortFunction Struct Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Spruce Docs</a> (100% documented)</p>
        <p class="header-right"><a href="https://github.com/willowtreeapps/spruce-ios"><img src="../img/gh.png"/>View on GitHub</a></p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Spruce Reference</a>
        <img id="carat" src="../img/carat.png" />
        CorneredSortFunction Struct Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Button.html">Button</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ViewController.html">ViewController</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enums</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/Angle.html">Angle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Corner.html">Corner</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Direction.html">Direction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Distance.html">Distance</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Position.html">Position</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Scale.html">Scale</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/SlideDirection.html">SlideDirection</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/StockAnimation.html">StockAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Weight.html">Weight</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/CGPoint.html">CGPoint</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIView.html">UIView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/Animation.html">Animation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/CornerSortFunction.html">CornerSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/DirectionSortFunction.html">DirectionSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/DistanceSortFunction.html">DistanceSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/PositionSortFunction.html">PositionSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/SortFunction.html">SortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/View.html">View</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/WeightSortFunction.html">WeightSortFunction</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structs</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/ContinuousSortFunction.html">ContinuousSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ContinuousWeightedSortFunction.html">ContinuousWeightedSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/CorneredSortFunction.html">CorneredSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/DefaultSortFunction.html">DefaultSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/InlineSortFunction.html">InlineSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LinearSortFunction.html">LinearSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/RadialSortFunction.html">RadialSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/RandomSortFunction.html">RandomSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SpringAnimation.html">SpringAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Spruce.html">Spruce</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SprucePoint.html">SprucePoint</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SpruceUIView.html">SpruceUIView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/StandardAnimation.html">StandardAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs.html#/s:V6Spruce9TimedView">TimedView</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>CorneredSortFunction</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">CorneredSortFunction</span><span class="p">:</span> <span class="kt"><a href="../Protocols/CornerSortFunction.html">CornerSortFunction</a></span></code></pre>

                </div>
              </div>
            <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> designed to animate in a corner like fashion. The views near the starting corner will animate first. In essence it appears to be a wiping function that will continue diagonally based on that corner.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vP6Spruce18CornerSortFunction6cornerOS_6Corner"></a>
                    <a name="//apple_ref/swift/Property/corner" class="dashAnchor"></a>
                    <a class="token" href="#/s:vP6Spruce18CornerSortFunction6cornerOS_6Corner">corner</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> designed to animate in a corner like fashion. The views near the starting corner will animate first. In essence it appears to be a wiping function that will continue diagonally based on that corner.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">corner</span><span class="p">:</span> <span class="kt"><a href="../Enums/Corner.html">Corner</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd"></a>
                    <a name="//apple_ref/swift/Property/interObjectDelay" class="dashAnchor"></a>
                    <a class="token" href="#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> designed to animate in a corner like fashion. The views near the starting corner will animate first. In essence it appears to be a wiping function that will continue diagonally based on that corner.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">interObjectDelay</span><span class="p">:</span> <span class="kt">TimeInterval</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vP6Spruce20DistanceSortFunction8reversedSb"></a>
                    <a name="//apple_ref/swift/Property/reversed" class="dashAnchor"></a>
                    <a class="token" href="#/s:vP6Spruce20DistanceSortFunction8reversedSb">reversed</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> designed to animate in a corner like fashion. The views near the starting corner will animate first. In essence it appears to be a wiping function that will continue diagonally based on that corner.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">reversed</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FV6Spruce20CorneredSortFunctioncFT6cornerOS_6Corner16interObjectDelaySd_S0_"></a>
                    <a name="//apple_ref/swift/Method/init(corner:interObjectDelay:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FV6Spruce20CorneredSortFunctioncFT6cornerOS_6Corner16interObjectDelaySd_S0_">init(corner:interObjectDelay:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">CorneredSortFunction</span><span class="p">:</span> <span class="kt"><a href="../Protocols/CornerSortFunction.html">CornerSortFunction</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FP6Spruce12SortFunction11timeOffsetsFT4viewCSo6UIView14recursiveDepthSi_GSaVS_9TimedView_"></a>
                    <a name="//apple_ref/swift/Method/timeOffsets(view:recursiveDepth:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FP6Spruce12SortFunction11timeOffsetsFT4viewCSo6UIView14recursiveDepthSi_GSaVS_9TimedView_">timeOffsets(view:recursiveDepth:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> designed to animate in a corner like fashion. The views near the starting corner will animate first. In essence it appears to be a wiping function that will continue diagonally based on that corner.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">timeOffsets</span><span class="p">(</span><span class="nv">view</span><span class="p">:</span> <span class="kt">UIView</span><span class="p">,</span> <span class="nv">recursiveDepth</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt"><a href="../Structs.html#/s:V6Spruce9TimedView">TimedView</a></span><span class="p">]</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>view</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>the view whose subviews should be animated. This view should not be included in the returned array</p>

                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>recursiveDepth</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>an int describing how deep into the view hiearchy the subview search should go, defaults to 0. A value of 0 is the same as calling the <code>subviews</code> on the actual view itself. Therefore a depth of 1 will be getting the subviews of each of the subviews, etc…</p>

                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>an array of <code><a href="../Structs.html#/s:V6Spruce9TimedView">TimedView</a></code>’s which contain references to the view needed to be animated and the time offset for when the animation of that individual view should start relative to the start of the overall animation</p>

                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FP6Spruce20DistanceSortFunction13distancePointFT4viewCSo6UIView8subviewsGSaPS_4View___VSC7CGPoint"></a>
                    <a name="//apple_ref/swift/Method/distancePoint(view:subviews:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FP6Spruce20DistanceSortFunction13distancePointFT4viewCSo6UIView8subviewsGSaPS_4View___VSC7CGPoint">distancePoint(view:subviews:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> designed to animate in a corner like fashion. The views near the starting corner will animate first. In essence it appears to be a wiping function that will continue diagonally based on that corner.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">distancePoint</span><span class="p">(</span><span class="nv">view</span><span class="p">:</span> <span class="kt">UIView</span><span class="p">,</span> <span class="nv">subviews</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/View.html">View</a></span><span class="p">]</span> <span class="o">=</span> <span class="p">[])</span> <span class="o">-&gt;</span> <span class="kt">CGPoint</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>view</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>the view for which the point coordinates will base their values off of</p>

                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>subviews</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>the subviews that are allocated for the <code>SortFunction</code>. The reason these are passed into the function is so that you can actually grab a reference point of a subview that is closest to the comparison point. This is done so that at least one view will start at the 0s marker.</p>

                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>a <code>CGPoint</code> object that will allow all views to compare their reference point to this returned value. If <code>translate</code> was used, this returned value should be equal to one of the <code>subviews</code> reference points.</p>

                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2017 <a class="link" href="https://willowtreeapps.com" target="_blank" rel="external">WillowTree</a>. All rights reserved. (Last updated: 2017-03-10)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
